package com.xtaller.sdboot.controller;

import com.xtaller.sdboot.entity.IamUser;
import com.xtaller.sdboot.service.IamUserApplicationService;
import com.xtaller.sdboot.service.IamUserService;
import com.xtaller.sdboot.utils.annotation.Permission;
import com.xtaller.sdboot.core.base.BaseController;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;

/** 
* 代码生成 
* @author: Taller  
* @date: 2020-02-07 15:45:06
* @Description: 基础用户控制器 
*/ 
@RestController 
@RequestMapping("/v1/iam/user") 
public class IamUserController extends BaseController<IamUser> {
    @Autowired private IamUserApplicationService userApplicationService;
    @Autowired private IamUserService userService;

    @ApiOperation("读取用户表格")
    @Permission(authorities = "iam:user:data:list")
    @Override
    public Object getByPage(HttpServletRequest request) throws Exception {
        return super.getByPage(request);
    }

    @Override
    @Permission(authorities = "iam:user:opt:create")
    public Object createEntity(@Valid @RequestBody IamUser entity, HttpServletRequest request) throws Exception {
        return super.createEntity(entity, request);
    }



}
